<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Group extends AppModel{
    var $name='Group';
    var $primaryKey = 'groupid';
    var $hasAndBelongsToMany = array(
        'User' => array(
            'className' => 'User',
            'joinTable' => 'users_groups',
            'foreignKey' => 'groupid',
            'associationForeignKey' => 'userid',
            'unique' => true,
            'with' => 'UserGroup'
        )
    );
}
?>
